1. Field of the Invention
The present invention relates to a method, a server, and a client used in a client-server distributed system which uses synchronous communication. More particularly, the present invention relates to a method, a server, and a client with which the turnaround time from when the client makes a server function call to the server until the client receives a notification that the server function has been completed, can be reduced.
2. Description of the Background Art
In conventional synchronous communication in a client-server distributed system using information processing terminals such as computers, a client makes a server function call to a server. The server executes processing corresponding to the called server function. When the processing has been completed, the server sends a notification of completion to the client.
FIG. 13 is a sequence diagram showing the flow of processing between a server and a client in a conventional synchronous communication method such as that described above. In FIG. 13, the time the client is able to perform processing operations is indicated by hatching. When the client makes a server function call to the server, the client cannot perform any process until receiving a notification from the server that the server function has been completed. The time from when the client calls a server function until the client is notified that the server function has been completed is called the “turnaround time”. In view of the problem that the client cannot perform any process during the turnaround time, there is proposed a technique for reducing turnaround time, i.e., a technique for reducing the client's wait time (see Japanese Laid-Open Patent Publication No. 9-330287, for example).
FIG. 14 is a sequence diagram showing the flow for a conventional synchronous communication method described in Japanese Laid-Open Patent Publication No. 9-330287. In FIG. 14, a client includes a client command section for executing a process on the client side and calling a server function; and a communication control section for communicating with a server. When the need to call a server function arises, the client command section requests the communication control section to call the server function. In response to the request, the communication control section immediately returns a completion notification to the client command section indicating that the server function call has been failed. At the same time, the communication control section sends a request message to the server through asynchronous communication to request for the execution of the server function. The server having received the request message executes processing corresponding to the requested server function. Upon completion of the server function processing, the server sends a completion message to the client. The communication control section of the client holds the content of the completion message having been sent from the server. When the communication control section receives a request from the client command section to call the server function again, the communication control section notifies the client command section of completion of the server function, based on the content of the completion message held thereby.
As described above, by employing the synchronous communication method described in Japanese Laid-Open Patent Publication No. 9-330287, the turnaround time for the client can be reduced.
In the above-described conventional synchronous communication method, the communication control section immediately returns a completion notification to the client command section that the execution of the server function has been failed, whereby the turn around time for the client can be reduced. However, since the actual server function call is not made at the time when a server function completion notification is returned to the client command section, the client command section needs to call the server function at least twice to confirm the processing result of the server function call.
In addition, since the timing at which the server function processing is completed is unknown, the client may possibly make the second server function call before receiving a completion message from the server, resulting in creation of an unnecessary process.